<!DOCTYPE html>
<html>
	<head>
		<meta charset="UTF-8">
		<title>分子常量 - 新增</title>
		<link charset="utf-8" rel="stylesheet" href="__PUBLIC__/static/asset/bootstrap/3.3.6/css/bootstrap.min.css">
	</head>
	<body>
		<form action="{:url('manage/const/add')}" method="post" id="form-data" onsubmit="return check()">
		<table class="table table-bordered">
			<tr>
				<td>单字母</td>
				<td>
					<input type="text" name="single" id="single">
				</td>
			</tr>
			<tr>
				<td>平均分子量</td>
				<td>
					<input type="text" name="mw">
				</td>
			</tr>
			<tr>
				<td>精确分子量</td>
				<td>
					<input type="text" name="em">
				</td>
			</tr>

			<tr>
				<td colspan="6" class="text-right">
					<button type="reset" class="btn btn-default"> 重置 </button>
					<button type="submit" class="btn btn-primary"> 增加 </button>
				</td>
			</tr>
		</table>
		</form>
		
		<script src="__PUBLIC__/static/asset/jquery/2.2.4/jquery.js"></script>

		<script>
            function check(){
            	var single = $('#single').val();
				if(!single || single.length==0){
					alert('请输入单字母');
					return false;
				}
            	return true;
            }
		</script>
	</body>
</html>